<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class SchoolModel extends Model
{
    protected $table = 'school';
    protected $guarded = [];

    protected $fillable = ['id', 'school_name', 'headmaster_id', 'address'];

    /**
     * 校区用户
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function users() {
        return $this->hasMany(UsersModel::class, 'school_id', 'id');
    }
}